home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Sunday Times: The Month 2003 December
/
The Sunday Times - The Month 2003-12.iso
/
mac
/
The Month DEC 03
/
engine
/
modules
/
text_short.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2003-05-30
|
1KB
|
42 lines
function init()
{
build();
_visible = true;
}
function build()
{
var Colors = Tardis.Colors;
var strColor = Colors.getString(nodeData.attributes.color);
var strColor2 = Colors.getString(nodeData.attributes.color2);
var strColor3 = Colors.getString(nodeData.attributes.color3);
var strTitle = "<FONT COLOR=\"" + strColor + "\">" + nodeData.byName("title").getText() + " </FONT>";
strTitle += "<FONT COLOR=\"" + strColor2 + "\">" + nodeData.byName("title2").getText() + " </FONT>";
strTitle += "<FONT COLOR=\"" + strColor3 + "\">" + nodeData.byName("title3").getText() + " </FONT>";
txtTitle.htmlText = strTitle;
txtTitle.resize();
var ndBody = nodeData.byName("body");
txtBody.htmlText = ndBody.getText();
txtBody.positionUnder(txtTitle);
if(ndBody.attributes.scrollbar != null)
{
txtBody._width = WIDTH_WITH_SCROLLBAR;
txtBody._height = PANEL_BOTTOM - txtBody._y - 12;
cmpScroll.setSize(txtBody._height);
cmpScroll._visible = true;
cmpScroll.positionUnder(txtTitle,5);
}
else
{
cmpScroll._visible = false;
txtBody._width = WIDTH_NO_SCROLLBAR;
txtBody.resize();
}
}
_visible = false;
stop();
WIDTH_WITH_SCROLLBAR = 335;
WIDTH_NO_SCROLLBAR = 350;
HEIGHT_WITH_SCROLLBAR = 122;
PANEL_BOTTOM = 187;
onReady();